home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 45
/
Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso
/
Aminet
/
dev
/
e
/
yaec.lha
/
examples
/
DirQuick.e
< prev
next >
Wrap
Text File
|
2001-08-12
|
640b
|
27 lines
/* nice directory command in E ! */
MODULE 'dos/dos'
PROC main()
DEF info:fileinfoblock,lock,c=0
IF lock:=Lock(arg,-2)
IF Examine(lock,info)
IF info.direntrytype>0
WriteF('Directory of: \s\n',info.filename)
WHILE ExNext(lock,info)
WriteF(IF info.direntrytype>0 THEN
'\e[1;32m\l\s[25]\e[0;31m' ELSE '\l\s[17] \r\d[7]',
info.filename,info.size)
WriteF(IF c++=2 THEN (c:=0) BUT '\n' ELSE ' ')
ENDWHILE
IF c THEN WriteF('\n')
ELSE
WriteF('No Dir!\n')
ENDIF
ENDIF
UnLock(lock)
ELSE
WriteF('What ?!?\n')
ENDIF
ENDPROC